package com.jy.rhin.domain.notification.topic.entity;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * @author WeiQ
 * @date 2022/6/28 9:47
 * 主题的预存查询
 */
@Data
@NoArgsConstructor
public class TopicQueryVO {

    public TopicQueryVO(String queryExp, String queryName) {
        this.queryExp = queryExp;
        this.queryName = queryName;
        this.filterList = new ArrayList<>();
    }

    /**
     * 添加过滤条件
     * @param filter
     * @return
     */
    public TopicQueryVO addFilter(TopicQueryFilterVO filter) {
        this.filterList.add(filter);
        return this;
    }

    /**
     * 预存查询函数表达式
     */
    private String queryExp;
    /**
     * 查询方法
     */
    private String queryName;
    /**
     * 与IHE对应
     */
    private String iheCode;
    private List<TopicQueryFilterVO> filterList;

}
